Previous Book Contents Book Index Next

Inside Macintosh: Programming With the Text Encoding Conversion Manager /
Chapter 3 - Text Encoding Converter Reference / Text Encoding Converter Functions
Obtaining Information About Available Text Encodings /


TECGetAvailableTextEncodings

Returns the text encoding specifications the converter is currently configured to handle.

pascal OSStatus TECGetAvailableTextEncodings (
                     TextEncoding availableEncodings[],
                     ItemCount maxAvailableEncodings,
                     ItemCount *actualAvailableEncodings);
availableEncodings[]
An array of text encoding specifications. On output, the TECGetAvailableTextEncodings function fills the array with the specifications for the text encodings the Text Encoding Converter currently supports. To determine how large an array to allocate, use the function TECCountAvailableTextEncodings (page 66).
maxAvailableEncodings
The number of text encoding specifications the availableEncodings array can contain.
actualAvailableEncodings
A pointer to a value of type ItemCount. On output, this value indicates the number of text encodings the function returned in the availableEncodings array.
function result
A result code. See "Text Encoding Conversion Manager Result Codes" (page 42) for a list of possible values. If other than noErr, then one of the text conversion plug-ins encountered an error when polled by the Text Encoding Converter.
DISCUSSION
The TECGetAvailableTextEncodings function returns the text encoding specifications in the array you pass to the function as the availableEncodings parameter, eliminating any duplicate information in the process. Consequently, the number of encodings TECGetAvailableTextEncodings returns in the available encodings array may be fewer than the number of elements you allocated for the array based on your call to TECCountAvailableTextEncodings (page 66). TECGetAvailableTextEncodings tells you the number of specifications it returns in the actualAvailableEncodings parameter.


Previous Book Contents Book Index Next

© Apple Computer, Inc.
13 NOV 1997